package com.niit.onlinemusicserver.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.niit.onlinemusicserver.common.R;
import com.niit.onlinemusicserver.model.domain.Song;
import com.niit.onlinemusicserver.model.request.SongRequest;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface SongService extends IService<Song> {

  R addSong (SongRequest addSongRequest, MultipartFile mpfile);

  R updateSongMsg(SongRequest updateSongRequest);

  R updateSongUrl(MultipartFile urlFile, int id);

  R updateSongPic(MultipartFile urlFile, int id);

  R deleteSong(Integer id);

  R allSong();

  R songOfSingerId(Integer singerId);

  R songOfId(Integer id);

  R songOfSingerName(String name);

  List<Integer> getAllSongIds();

  R songOfSongListId(int songListId);

  R downloadSong(Integer id);

  /**
   * 判断歌曲是否支付
   * @param songId
   * @param userId
   * @return true 已购买歌曲
   */
  R isPay(Integer songId, Integer userId);

  /**
   * @Description: 根据用户id获取该用户的推荐歌曲列表
   **/
  R getRecommendSongList(Integer userId);
}